﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Geometry
{
	public class Rect
	{
		private float independentTerm;
		private float slope;

		public float IndependentTerm
		{
			get { return independentTerm; }
		}

		public float Slope
		{
			get { return slope; }
		}

		public Rect(GeomVector2 pointA, GeomVector2 pointB)
		{
			independentTerm = (pointA.Y*pointB.X - pointA.X*pointB.Y)/(pointB.X - pointA.X);
			slope = (pointA.Y - pointB.Y)/(pointA.X - pointB.X);
		}

		public Rect(Rect rect)
		{
			independentTerm = rect.IndependentTerm;
			slope = rect.Slope;
		}

		public List<GeomVector2> getIntersectionPoints(Circle circle)
		{
			return Intersection.getIntersection(this, circle);
		}

	}
}
